/**
 * @brief  Linear Algebra Refactorization functions used in porting cuSolver APIs
 */

#ifndef CUSOLVER_RF_WRAPPER_H_
#define CUSOLVER_RF_WRAPPER_H_

#include "cusolver_common_wrapper.h"
#include "mcsolverRf.h"

#define CUSOLVERRF_H_ MCSOLVER_CUSOLVER_RF_H_

/* CUSOLVERRF mode */
#define cusolverRfResetValuesFastMode_t mcsolverRfResetValuesFastMode_t
#define CUSOLVERRF_RESET_VALUES_FAST_MODE_OFF MCSOLVERRF_RESET_VALUES_FAST_MODE_OFF
#define CUSOLVERRF_RESET_VALUES_FAST_MODE_ON MCSOLVERRF_RESET_VALUES_FAST_MODE_ON

/* CUSOLVERRF matrix format */
#define cusolverRfMatrixFormat_t mcsolverRfMatrixFormat_t
#define CUSOLVERRF_MATRIX_FORMAT_CSR MCSOLVERRF_MATRIX_FORMAT_CSR
#define CUSOLVERRF_MATRIX_FORMAT_CSC MCSOLVERRF_MATRIX_FORMAT_CSC

/* CUSOLVERRF unit diagonal */
#define cusolverRfUnitDiagonal_t mcsolverRfUnitDiagonal_t
#define CUSOLVERRF_UNIT_DIAGONAL_STORED_L MCSOLVERRF_UNIT_DIAGONAL_STORED_L
#define CUSOLVERRF_UNIT_DIAGONAL_STORED_U MCSOLVERRF_UNIT_DIAGONAL_STORED_U
#define CUSOLVERRF_UNIT_DIAGONAL_ASSUMED_L MCSOLVERRF_UNIT_DIAGONAL_ASSUMED_L
#define CUSOLVERRF_UNIT_DIAGONAL_ASSUMED_U MCSOLVERRF_UNIT_DIAGONAL_ASSUMED_U

/* CUSOLVERRF factorization algorithm */
#define cusolverRfFactorization_t mcsolverRfFactorization_t
#define CUSOLVERRF_FACTORIZATION_ALG0 MCSOLVERRF_FACTORIZATION_ALG0
#define CUSOLVERRF_FACTORIZATION_ALG1 MCSOLVERRF_FACTORIZATION_ALG1
#define CUSOLVERRF_FACTORIZATION_ALG2 MCSOLVERRF_FACTORIZATION_ALG2

/* CUSOLVERRF triangular solve algorithm */
#define cusolverRfTriangularSolve_t mcsolverRfTriangularSolve_t
#define CUSOLVERRF_TRIANGULAR_SOLVE_ALG1 MCSOLVERRF_TRIANGULAR_SOLVE_ALG1
#define CUSOLVERRF_TRIANGULAR_SOLVE_ALG2 MCSOLVERRF_TRIANGULAR_SOLVE_ALG2
#define CUSOLVERRF_TRIANGULAR_SOLVE_ALG3 MCSOLVERRF_TRIANGULAR_SOLVE_ALG3

/* CUSOLVERRF numeric boost report */
#define cusolverRfNumericBoostReport_t mcsolverRfNumericBoostReport_t
#define CUSOLVERRF_NUMERIC_BOOST_NOT_USED MCSOLVERRF_NUMERIC_BOOST_NOT_USED
#define CUSOLVERRF_NUMERIC_BOOST_USED MCSOLVERRF_NUMERIC_BOOST_USED

/* Opaque structure holding CUSOLVERRF library common */
#define cusolverRfCommon mcsolverRfCommon
#define cusolverRfHandle_t mcsolverRfHandle_t

#define cusolverRfCreate mcsolverRfCreate
#define cusolverRfDestroy mcsolverRfDestroy
#define cusolverRfGetMatrixFormat mcsolverRfGetMatrixFormat
#define cusolverRfSetMatrixFormat mcsolverRfSetMatrixFormat
#define cusolverRfSetNumericProperties mcsolverRfSetNumericProperties
#define cusolverRfGetNumericProperties mcsolverRfGetNumericProperties
#define cusolverRfGetNumericBoostReport mcsolverRfGetNumericBoostReport
#define cusolverRfSetAlgs mcsolverRfSetAlgs
#define cusolverRfGetAlgs mcsolverRfGetAlgs
#define cusolverRfGetResetValuesFastMode mcsolverRfGetResetValuesFastMode
#define cusolverRfSetResetValuesFastMode mcsolverRfSetResetValuesFastMode
#define cusolverRfSetupHost mcsolverRfSetupHost
#define cusolverRfSetupDevice mcsolverRfSetupDevice
#define cusolverRfResetValues mcsolverRfResetValues
#define cusolverRfAnalyze mcsolverRfAnalyze
#define cusolverRfRefactor mcsolverRfRefactor
#define cusolverRfAccessBundledFactorsDevice mcsolverRfAccessBundledFactorsDevice
#define cusolverRfExtractBundledFactorsHost mcsolverRfExtractBundledFactorsHost
#define cusolverRfExtractSplitFactorsHost mcsolverRfExtractSplitFactorsHost
#define cusolverRfSolve mcsolverRfSolve
#define cusolverRfBatchSetupHost mcsolverRfBatchSetupHost
#define cusolverRfBatchResetValues mcsolverRfBatchResetValues
#define cusolverRfBatchAnalyze mcsolverRfBatchAnalyze
#define cusolverRfBatchRefactor mcsolverRfBatchRefactor
#define cusolverRfBatchSolve mcsolverRfBatchSolve
#define cusolverRfBatchZeroPivot mcsolverRfBatchZeroPivot

#endif
